package kayao.common;

import java.util.Date;

public class KayaoValues {
	/** The maximum numbers of frames per second. */
	public static final int MAX_FPS = 30;
	/** The maximum draw time in milliseconds. */
	public static final int MAX_DRAW_TIME = 1000 / MAX_FPS;
	/** The maximum number of clients. */
	public static int MAX_NUMBER_OF_CLIENTS = 32;
	/** The initialization of the magic number, in the server is set. */
	public static int MAGIC_NUMBER=0;
	/** The number of teams. */
	public static int NUMBER_OF_TEAMS = 2;
	
	
	/** The server login port to listen  */
	public static final int SERVER_PORT=55555;
	/** The server king request port to listen  */
	//public static final int SERVER_KING_REQUEST_PORT=55555; //the same at the moment
	public static final int CLIENT_LOGIN_PORT = 4444;
	public static final int CLIENT_READ_PORT=4444;
	public static final int CLIENT_SEND_PORT = 4446;
	
	
	/** The ID of the playing request message. */
	public static final byte PLAYING_REQUEST_MESSAGE=1;
	/** The ID of the playing request answer message. */
	public static final byte PLAYING_REQUEST_REPLY_MESSAGE=2;
	/** The ID of the king request message. */
	public static final byte KING_REQUEST_MESSAGE = 3;
	/** The ID of the king request answer message. */
	public static final byte KING_REQUEST_REPLY_MESSAGE=4; //The same than the answer at the moment
	/** The id of the message handling request of subscriptions from slave to king	 */
	public static final byte SUSCRIPTION_REQUEST=5;
	/** The id of the answer message from king to slave	 */
	public static final byte SUSCRIPTION_REQUEST_ANSWER=6;
	/** The id of the negative answer message from an old king to slave	 */
	public static final byte SUSCRIPTION_REQUEST_NEGATIVE_ANSWER=7;
	public static final byte NEW_MATE_ARRIVED = 8;
	public static final byte STATE_UPDATE = 9;
	public static final byte NEW_MATE_REPLY = 10;
	public static final byte LOGOUT_MSG = 11;
	public static final byte TEAM_COMMUNICATION = 12;	
	/** The ID of the message from the client "what time is it?" */
	public static final byte WHAT_TIME_IS_IT_MESSAGE=13;
	/** The ID of the message from the server "the time is .." */
	public static final byte TIME_IS_MESSAGE=14;
	public static final byte DEAD_CLIENT = 15;
	public static final byte TEAM_COMMUNICATION_REPLY = 16;
	public static final byte NEW_MISSION = 17;
	public static final byte UNSUBSCRIBE_MSG = 18;
	public static final byte FLAG_COLLISION = 19;

		
	/** The max bytes in a king request by a client.
	 *  The buffer in the reception in the server will have that size */
	public static final int MAX_KING_REQUEST_SIZE = 100;

	
	/**
	 * These are mainly used in the AreaManager
	 */
	public static int NUMBER_OF_KINGDOMS;
	public static final int TOTAL_MAP_WIDTH = 100;
	public static final int TOTAL_MAP_HEIGHT = 100;
	public static final int NUM_REGIONS_X = 2;
	public static final int NUM_REGIONS_Y = 1; // Every second column will be +1
	/*   -------
	 *  |       |
	 *  |   x===|   the length of = is interest_box
	 *  |       |
	 *   -------
	 */
	public static final int INTEREST_BOX = 10;
	
	
	

	
	/**
	 * These are used by the servermonitor
	 */
	public static String SERVER_IP = "130.240.96.177";
	public static Date SERVER_START;
	public static Date CLIENT_START;
}